<!doctype html>
<html>
<head>
	<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
	<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<title>Bidi Mobile test - ValuePicker</title>

	<script type="text/javascript" src="../../deviceTheme.js" data-dojo-config="mblThemeFiles: ['base','ValuePicker']"></script>
	<script type="text/javascript" src="../../../../dojo/dojo.js" data-dojo-config="async: true, parseOnLoad: true, has: { 'dojo-bidi': true }"></script>

	<script type="text/javascript">
		require([
			"dojo/_base/connect",
			"dojo/ready",
			"dojo/_base/array",
			"dojo/dom",
			"dijit/registry",
			"dijit/_base/manager",
			"dojox/mobile/parser",
			"dojox/mobile",
			"dojox/mobile/compat",
			"dojox/mobile/ValuePicker",	
			"dojox/mobile/ValuePickerSlot",		
			"dojox/mobile/Button",
			"dojox/mobile/ScrollableView",
			"dojox/mobile/ListItem"
		], function(connect, ready, array, dom, registry){
			ready(function(){
			
				//change label 
				var btn1 = registry.byId("btnlbl");
				btn1.connect(btn1, "onClick", function(){
					registry.byId("first3").set("value","\u05e9\u05dc\u05d5\u05dd for TEST!");	
						
				});
	
			
				//change textDir, text
				var btnLtr = registry.byId("btn5");				
				btnLtr.connect(btnLtr, "onClick", function(){
					registry.byId("first1").set("textDir", "ltr");
				});
				var btnRtl = registry.byId("btn6");
				btnLtr.connect(btnRtl, "onClick", function(){
					registry.byId("first1").set("textDir", "rtl");				
				});	
				var btnAuto = registry.byId("btn7");
				btnAuto.connect(btnAuto, "onClick", function(){
					registry.byId("first1").set("textDir", "auto");					
				});						
		});
	});
	</script>

	<style>
	html,body {
		height: 100%;
		overflow: hidden;
	}
	hr {
		border: none;
		margin: 0;
	}
	button {
		width: 180px;
		margin: 15px 10px 0;
	}
	button.customButton {
		border-color: #cc3333;
		background-image: url(../images/red-button-bg.png);
		background-image: -webkit-gradient(linear, left top, left bottom, from(#D3656D), to(#BC1320), color-stop(0.5, #C9404B), color-stop(0.5, #BC1421));
		color: #ffffff;
	}
	</style>
</head>
<body style="visibility:hidden;">
<div id="group1" data-dojo-type="dojox.mobile.View" data-dojo-props='keepScrollPos:false'><!-- keepScrollPos=false is to improve performance -->
	<div id="view0" data-dojo-type="dojox.mobile.ScrollableView">
	        <h2 data-dojo-type="dojox.mobile.Heading">ValuePicker widget</h2>
		<h1 data-dojo-type="dojox.mobile.Heading">dir LTR</h1>	
		<ul data-dojo-type="dojox.mobile.EdgeToEdgeList" >
			<li id="l1" data-dojo-type="dojox.mobile.ListItem" data-dojo-props='icon:"../images/LTR.png", moveTo:"view1"'>Tex Dir LTR</li>
			<li id="l2" data-dojo-type="dojox.mobile.ListItem" data-dojo-props='icon:"../images/RTL.png", moveTo:"view2"'>Tex Dir RTL</li>
			<li id="l3" data-dojo-type="dojox.mobile.ListItem"  data-dojo-props='icon:"../images/auto.png", moveTo:"view3"'>Tex Dir AUTO</li>
		</ul>
		<h1 data-dojo-type="dojox.mobile.Heading">dir RTL</h1>
		<ul data-dojo-type="dojox.mobile.EdgeToEdgeList" >
			<li id="l4" data-dojo-type="dojox.mobile.ListItem"  data-dojo-props='icon:"../images/LTR.png", moveTo:"view4"'>Tex Dir LTR</li>
			<li id="l5" data-dojo-type="dojox.mobile.ListItem"  data-dojo-props='icon:"../images/RTL.png", moveTo:"view5"'>Tex Dir RTL</li>
			<li id="l6" data-dojo-type="dojox.mobile.ListItem"  data-dojo-props='icon:"../images/auto.png", moveTo:"view6"'>Tex Dir AUTO</li>
		</ul>	
	</div>	
	
	
	<div id="view1" data-dojo-type="dojox.mobile.ScrollableView">
		<h1 data-dojo-type="dojox.mobile.Heading" data-dojo-props='back:"Back", moveTo:"view0"'>Dir LTR | textDir LTR</h1>
		<button data-dojo-type="dojox.mobile.Button" id="btn5" class="mblRedButton" data-dojo-props='label:"Set Slot textDir ltr"'></button>
		<button data-dojo-type="dojox.mobile.Button" id="btn6" class="mblRedButton" data-dojo-props='label:"Set Slot textDir rtl"'></button>
		<button data-dojo-type="dojox.mobile.Button" id="btn7" class="mblRedButton" data-dojo-props='label:"Set Slot textDir auto"'></button>		
		
		<div data-dojo-type="dojox/mobile/RoundRect" data-dojo-props='shadow:true'>	
		
				
		<div data-dojo-type="dojox/mobile/View">
			<h1 data-dojo-type="dojox/mobile/Heading">TextDir is set to ValuePickerSlot</h1>
			<div id="spin1" data-dojo-type="dojox/mobile/ValuePicker">
				<div data-dojo-type="dojox/mobile/ValuePickerSlot"
					data-dojo-props="labels:['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']"
					style="text-align:center;width:40px;"></div>
				<div data-dojo-type="dojox/mobile/ValuePickerSlot"
					data-dojo-props='labelFrom:0, labelTo:9'
					style="width:50px;"></div>
				<div id="first1" data-dojo-type="dojox/mobile/ValuePickerSlot"
					data-dojo-props="labels:['Hello world!','&#1513;&#1500;&#1493;&#1501; &#1506;&#1493;&#1500;&#1501;!','Hello &#1506;&#1493;&#1500;&#1501;!','&#1513;&#1500;&#1493;&#1501; World!'],textDir:'ltr'"
					style="width:200px;"></div>
				</div>
			</div>
		<h1 data-dojo-type="dojox/mobile/Heading">TextDir is set to ValuePicker</h1>
		<div id="spin11" data-dojo-type="dojox/mobile/ValuePicker" data-dojo-props="textDir:'ltr'">
			<div data-dojo-type="dojox/mobile/ValuePickerSlot"
				data-dojo-props="labels:['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']"
				style="text-align:center;width:40px;"></div>
			<div data-dojo-type="dojox/mobile/ValuePickerSlot"
				data-dojo-props='labelFrom:0, labelTo:9'
				style="width:50px;"></div>
			<div id="first11" data-dojo-type="dojox/mobile/ValuePickerSlot"
				data-dojo-props="labels:['Hello world!','&#1513;&#1500;&#1493;&#1501; &#1506;&#1493;&#1500;&#1501;!','Hello &#1506;&#1493;&#1500;&#1501;!','&#1513;&#1500;&#1493;&#1501; World!']"
				style="width:200px;"></div>
			</div>
		</div>			
		</div>
			
	</div>
	
		
	<div id="view2" data-dojo-type="dojox.mobile.ScrollableView">
		<h1 data-dojo-type="dojox.mobile.Heading" data-dojo-props='back:"Back", moveTo:"view0"'>Dir LTR | textDir RTL</h1>
		<div data-dojo-type="dojox/mobile/RoundRect" data-dojo-props='shadow:true'>	
		
		<div data-dojo-type="dojox/mobile/View">
			<h1 data-dojo-type="dojox/mobile/Heading">TextDir is set to ValuePickerSlot</h1>
			<div id="spin2" data-dojo-type="dojox/mobile/ValuePicker" >
				<div data-dojo-type="dojox/mobile/ValuePickerSlot"
					data-dojo-props="labels:['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']"
					style="text-align:center;width:40px;"></div>
				<div data-dojo-type="dojox/mobile/ValuePickerSlot"
					data-dojo-props='labelFrom:0, labelTo:9'
					style="width:50px;"></div>
				<div id="first2" data-dojo-type="dojox/mobile/ValuePickerSlot"
					data-dojo-props="labels:['Hello world!','&#1513;&#1500;&#1493;&#1501; &#1506;&#1493;&#1500;&#1501;!','Hello &#1506;&#1493;&#1500;&#1501;!','&#1513;&#1500;&#1493;&#1501; World!'],textDir:'rtl'"
					style="width:200px;"></div>
				</div>
			</div>
			<h1 data-dojo-type="dojox/mobile/Heading">TextDir is set to ValuePicker</h1>
			<div id="spin22" data-dojo-type="dojox/mobile/ValuePicker" data-dojo-props="textDir:'rtl'">
				<div data-dojo-type="dojox/mobile/ValuePickerSlot"
					data-dojo-props="labels:['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']"
					style="text-align:center;width:40px;"></div>
				<div data-dojo-type="dojox/mobile/ValuePickerSlot"
					data-dojo-props='labelFrom:0, labelTo:9'
					style="width:50px;"></div>
				<div id="first22" data-dojo-type="dojox/mobile/ValuePickerSlot"
					data-dojo-props="labels:['Hello world!','&#1513;&#1500;&#1493;&#1501; &#1506;&#1493;&#1500;&#1501;!','Hello &#1506;&#1493;&#1500;&#1501;!','&#1513;&#1500;&#1493;&#1501; World!']"
					style="width:200px;"></div>
				</div>
			</div>			
			
		
		</div>
	</div>
		
	<div id="view3" data-dojo-type="dojox.mobile.ScrollableView">	
		<h1 data-dojo-type="dojox.mobile.Heading" data-dojo-props='back:"Back", moveTo:"view0"'>Dir LTR | textDir AUTO</h1>
		<div data-dojo-type="dojox/mobile/RoundRect" data-dojo-props='shadow:true'>
		<div data-dojo-type="dojox/mobile/View">
		<h1 data-dojo-type="dojox/mobile/Heading">TextDir is set to ValuePickerSlot</h1>
		<div id="spin3" data-dojo-type="dojox/mobile/ValuePicker">
			<div data-dojo-type="dojox/mobile/ValuePickerSlot"
				data-dojo-props="labels:['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']"
				style="text-align:center;width:40px;"></div>
			<div data-dojo-type="dojox/mobile/ValuePickerSlot"
				data-dojo-props='labelFrom:0, labelTo:9'
				style="width:50px;"></div>
			<div id="first3" data-dojo-type="dojox/mobile/ValuePickerSlot"
				data-dojo-props="labels:['Hello world!','&#1513;&#1500;&#1493;&#1501; &#1506;&#1493;&#1500;&#1501;!','Hello &#1506;&#1493;&#1500;&#1501;!','&#1513;&#1500;&#1493;&#1501; World!'],textDir:'auto'"
				style="width:200px;"></div>
			</div>
		</div>		
		<button data-dojo-type="dojox.mobile.Button" id="btnlbl" >Set new text Button for picker slot</button>
		
		</div>		
		<h1 data-dojo-type="dojox/mobile/Heading">TextDir is set to ValuePicker</h1>
		<div id="spin33" data-dojo-type="dojox/mobile/ValuePicker" data-dojo-props="textDir:'auto'">
			<div data-dojo-type="dojox/mobile/ValuePickerSlot"
				data-dojo-props="labels:['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']"
				style="text-align:center;width:40px;"></div>
			<div data-dojo-type="dojox/mobile/ValuePickerSlot"
				data-dojo-props='labelFrom:0, labelTo:9'
				style="width:50px;"></div>
			<div id="first33" data-dojo-type="dojox/mobile/ValuePickerSlot"
				data-dojo-props="labels:['Hello world!','&#1513;&#1500;&#1493;&#1501; &#1506;&#1493;&#1500;&#1501;!','Hello &#1506;&#1493;&#1500;&#1501;!','&#1513;&#1500;&#1493;&#1501; World!']"
				style="width:200px;"></div>
			</div>
		</div>				
	</div>	
	 
	 
	<div dir="rtl" id="view4" data-dojo-type="dojox.mobile.ScrollableView">
		<h1 data-dojo-type="dojox.mobile.Heading" data-dojo-props='back:"Back", moveTo:"view0"'>Dir RTL | textDir LTR</h1>
		<div data-dojo-type="dojox/mobile/RoundRect" data-dojo-props='shadow:true, textDir:"ltr"'>	
		<div data-dojo-type="dojox/mobile/View">
		<h1 data-dojo-type="dojox/mobile/Heading">TextDir is set to ValuePickerSlot</h1>
		<div id="spin4" data-dojo-type="dojox/mobile/ValuePicker">
			<div data-dojo-type="dojox/mobile/ValuePickerSlot"
				data-dojo-props="labels:['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']"
				style="text-align:center;width:40px;"></div>
			<div data-dojo-type="dojox/mobile/ValuePickerSlot"
				data-dojo-props='labelFrom:0, labelTo:9'
				style="width:50px;"></div>
			<div id="first4" data-dojo-type="dojox/mobile/ValuePickerSlot"
				data-dojo-props="labels:['Hello world!','&#1513;&#1500;&#1493;&#1501; &#1506;&#1493;&#1500;&#1501;!','Hello &#1506;&#1493;&#1500;&#1501;!','&#1513;&#1500;&#1493;&#1501; World!'],textDir:'ltr'"
				style="width:200px;"></div>
			</div>
		</div>
		
		
		</div>
		
		
	</div>
	<div id="view5" data-dojo-type="dojox.mobile.ScrollableView">
		<h1 data-dojo-type="dojox.mobile.Heading" data-dojo-props='back:"Back", moveTo:"view0"'>Dir RTL | textDir RTL</h1>
		<div data-dojo-type="dojox/mobile/RoundRect" data-dojo-props='shadow:true'>	
			
			<div data-dojo-type="dojox/mobile/View">
		<h1 data-dojo-type="dojox/mobile/Heading">TextDir is set to ValuePickerSlot</h1>
		<div dir="rtl" id="spin5" data-dojo-type="dojox/mobile/ValuePicker" >
			<div data-dojo-type="dojox/mobile/ValuePickerSlot"
				data-dojo-props="labels:['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']"
				style="text-align:center;width:40px;"></div>
			<div data-dojo-type="dojox/mobile/ValuePickerSlot"
				data-dojo-props='labelFrom:0, labelTo:9'
				style="width:50px;"></div>
			<div id="first5" data-dojo-type="dojox/mobile/ValuePickerSlot"
				data-dojo-props="labels:['Hello world!','&#1513;&#1500;&#1493;&#1501; &#1506;&#1493;&#1500;&#1501;!','Hello &#1506;&#1493;&#1500;&#1501;!','&#1513;&#1500;&#1493;&#1501; World!'],textDir:'rtl'"
				style="width:200px;"></div>
			</div>
		</div>
			
			</div>
				
		
		</div>	
	<div dir="rtl" id="view6" data-dojo-type="dojox.mobile.ScrollableView">	
		<h1 data-dojo-type="dojox.mobile.Heading" data-dojo-props='back:"Back", moveTo:"view0"'>Dir RTL | textDir AUTO</h1>
		<div data-dojo-type="dojox/mobile/RoundRect" data-dojo-props='shadow:true'>
		<div data-dojo-type="dojox/mobile/View">
		<h1 data-dojo-type="dojox/mobile/Heading">TextDir is set to ValuePickerSlot</h1>
		<div id="spin6" data-dojo-type="dojox/mobile/ValuePicker">
			<div data-dojo-type="dojox/mobile/ValuePickerSlot"
				data-dojo-props="labels:['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']"
				style="text-align:center;width:40px;"></div>
			<div data-dojo-type="dojox/mobile/ValuePickerSlot"
				data-dojo-props='labelFrom:0, labelTo:9'
				style="width:50px;"></div>
			<div id="first6" data-dojo-type="dojox/mobile/ValuePickerSlot"
				data-dojo-props="labels:['Hello world!','&#1513;&#1500;&#1493;&#1501; &#1506;&#1493;&#1500;&#1501;!','Hello &#1506;&#1493;&#1500;&#1501;!','&#1513;&#1500;&#1493;&#1501; World!'],textDir:'auto'"
				style="width:200px;"></div>
			</div>
		</div>	
		
		
		</div>				
		
	</div>	


</div>
</body>
</html>
